<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        "use strict";
        //向对象里面添加属性，添加了就不能再添加属性了
        let web={
            name:"唐玮",
            age:25
        };
      

        Object.preventExtensions(web);//只能添加一个属性，之后不能再添加内容了
        //还有判断操作,如果为true才能再添加属性
        if(Object.isExtensible(web)){
                web.grade=100;
                console.log(web);
        }

                                    

    </script>
</body>
</html>